#include <func.h>

int main()
{
    int shmid;
    shmid=shmget(1000,4096,IPC_CREAT|0600);
    printf("%d\n",shmid);
    ERROR_CHECK(shmid,-1,"shmget");
    char *p=shmat(shmid,NULL,0);
    if(fork())
    {
        strcpy(p,"How are you");
        sleep(2);
        return 0;
    }
    else
    {
        sleep(1);
        printf("%s\n",p);
        return 0;
    }
}